package com.zhijiaoyun.service;

import com.zhijiaoyun.model.Comment;
import com.zhijiaoyun.model.dto.PageList;

/**
 * @author shisfish
 * @date 2017/12/26
 */
public interface ICommentService {

    /**
     * 新增
     *
     * @param comment
     */
    void insert(Comment comment);

    /**
     * get by id
     * @param id
     * @return
     */
    Comment getById(long id);

    /**
     * delete by id
     * @param id
     */
    void deleteById(long id);

    /**
     * delete
     * @param comment
     */
    void delete(Comment comment);

    /**
     * 分页 某个课程的评论
     * @param pageIndex
     * @param pageSize
     * @param courseId
     * @return
     */
    PageList<Comment> pageByCourseId(int pageIndex, int pageSize, long courseId);
}
